package com.ijunfu.spring.bean_use._05_bean_ext.config;

import com.ijunfu.spring.bean_use._05_bean_ext.annotation.MyPrototypeBean;
import com.ijunfu.spring.bean_use._05_bean_ext.service.RoleService;
import com.ijunfu.spring.bean_use._05_bean_ext.service.UserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 *
 * @Title  : 
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/3 18:26
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
@Configuration
public class MyConfig {

    @MyPrototypeBean
    public UserService userService() {
        return new UserService();
    }

    @Bean
    @Scope("prototype")
    public RoleService roleService() {
        return new RoleService();
    }
}
